home *** CD-ROM | disk | FTP | other *** search
/ The X-Philes (2nd Revision) / The X-Philes Number 1 (1995).iso / xphiles / hp48hor2 / roldx32.doc < prev    next >
Text File  |  1995-03-31  |  14KB  |  345 lines

  1. (Comp.sources.hp48) 
  2. Item: 110 by jweisbin@cix.compulink.co.uk 
  3. Author: [James Weisbin] 
  4.   Subj: Roldx v3.2 
  5.   Date: Fri May 22 1992 
  6.  
  7. version 3.2 01-05-92 
  8. [Note: This is an upgrade to Jim's ROLDX on Goodies Disk #6.  -jkh-] 
  9.  
  10. Roldx for the HP48 by James Weisbin, portions of code by 
  11. Simone Rapisarda, Jim Cloos, and Rick Grevelle 
  12.  
  13. Revisions to Roldx version 3.2 from version 3.1: 
  14.  
  15. 1.   When inserting items from the stack, the stk-> routine 
  16.      left the item on the stack - this has been changed to 
  17.      delete the item from the satck, if the item was inserted 
  18.      successfully, which is more practical. 
  19.  
  20. Revisions to Roldx version 3.1 from version 3.0: 
  21.  
  22. 1.   Multiple data lists can be maintained, and switched to 
  23.      easily, using the DATA function. 
  24.  
  25. 2.   Some bugs fixed, especially password/lock functions which 
  26.      didn't work (sorry). 
  27.  
  28. Revisions to Roldx version 3.0 from version 2.0: 
  29.  
  30. 1.   Items in list can have as many fields as you like 
  31.      (but only 7 can be displayed, or 8 with the menu 
  32.      line turned off). 
  33.  
  34. 2.   Display routine uses machine-language "MDISP", by 
  35.      Rick Grevelle, for much faster display. 
  36.  
  37. 3.   Password protection is available for individual 
  38.      items using machine-language "CODER" routine, by 
  39.      Simone Rapisarda and Jim Cloos. 
  40.  
  41. 4.   The menu line can be turned off to see one extra 
  42.      line, for a total of 8 lines. 
  43.  
  44. 5.   Extensive rewriting, optimization, and use of the 
  45.      machine-language "UPCASE" program, has resulted in 
  46.      faster search speeds. (There is still some room for 
  47.      improvement, though). 
  48.  
  49. 6.   Status menu rewritten with graphic icon-like 
  50.      symbols. 
  51.  
  52. 7.   Many error traps have been added, so user can break 
  53.      out of searches and text entry, for example, without 
  54.      quitting the program. 
  55.  
  56. WARNING: The machine language routines used here have not 
  57. been written by me and have only been tested on my Rev B 
  58. HP48SX - no guarantees are made that they will work on any 
  59. machine.      
  60.  
  61. Yet another rolodex program for the HP48. After sampling 
  62. the various rolodex-type programs out there, I decided I 
  63. needed to write my own. This one is written entirely in 
  64. user code, with the exception of the MDISP program,by 
  65. Rick Grevelle, the CODER program, by Simone Rapisarda and 
  66. Jim Cloos, and the UPCASE program, author unknown.  
  67. Overall it is not as fast as some of the of the other  
  68. roldx programs, but it has many features that others lack, 
  69. like the ability to view only the "headings" of up to 8  
  70. entries at once (in fact, any line number can be selected),  
  71. password protection for individual items, etc.  
  72. PICT is not used, so it is not overwritten, and keeps  
  73. the speed up to a reasonable standard. The database  
  74. structure is "free form" in the sense that you can store  
  75. anything you like on any line, an "item" being a collection  
  76. of fields in a list. Up to seven fields of 22 characters  
  77. each can be displayed, or eight fields if the menu line  
  78. is turned off. If a line contains more than 22 characters,  
  79. it will be truncated (well, you can't have everything!).  
  80. The 48 can display 7 lines of text quickly with a minimum  
  81. of fuss and I find this to be adequate room to store name,  
  82. address, phone, fax, and email data. The program is  
  83. distributed as a directory. Make sure the Roldx directory  
  84. is your current directory, then press ROLDX to start.  
  85. You will see a screen with all 7 lines of the current item,  
  86. which will be one of two items when you first start the program.  
  87. You can't delete the first item if there are no others, but 
  88. you can edit it (or exit the program, put the list on the 
  89. stack, and edit it using normal HP48 methods). You will 
  90. also see a menu with the following items: 
  91.  
  92. FIND      FIND text prompted for. If one character only, 
  93.           only the 1st character of the line selected 
  94.           is checked for a match. If more than one 
  95.           character, a match is sought in any 
  96.           position. Only the line number set by the 
  97.           variable rdLINE is searched. Case is ignored in 
  98.           the search (all text is temporarily converted 
  99.           to uppercase by the UPCASE routine). If lock 
  100.           mode is "on" (flag 39 clear) then password 
  101.           protected items won't be found. 
  102.  
  103. STATUS    find out about and change settings. Brings up 
  104.           the following menu: 
  105.            
  106.           LINE?   |--->   ====    >-- ?  DATA    MAIN 
  107.  
  108.           the first menu key prompts you for the line 
  109.           number to search, and display if flag 34 is 
  110.           set. 
  111.  
  112.           the second key controls the search mode (flag 
  113.           33) whether the database is searched from the 
  114.           top or from the current item to the end. 
  115.  
  116.           the third menu key toggles the display mode 
  117.           (flag 34) - whether one line of each item, or 
  118.           7 or 8 lines of current item are displayed. 
  119.  
  120.           the fourth menu key (picture above is supposed 
  121.           to look like a key) toggles password mode. When 
  122.           toggling it "on" you will be prompted for the 
  123.           password. There is no "wrong" password, but 
  124.           your data will be garbled unless you use the 
  125.           same one you used when you encoded it. 
  126.  
  127.           the fifth menu key (DATA) allows you to select 
  128.           a name from the list rdLIST. You must add the  
  129.           names of all data lists to this list though, 
  130.           while outside of the ROLDX program. 
  131.  
  132.           the last menu key returns you to the main 
  133.           screen. 
  134.  
  135. HELP      brings up a short help screen. 
  136.  
  137. ->STK     put the current item on the stack. 
  138.  
  139. STK->     insert an item from the stack. (Must be a list 
  140.           with at least 1 item). 
  141.  
  142. EXIT      quit this program. 
  143.  
  144. In addition to the menu keys above, the following key- 
  145. presses are supported: 
  146.  
  147. right-arrow, down-arrow, NEXT           next item. 
  148.  
  149. up-arrow, left arrow, PREV              previous item. 
  150.  
  151. left-shift right-arrow & down-arrow     next 7th (or 8th) 
  152.                                         item. 
  153.  
  154. left-shift left-arrow & up-arrow        prev 7th (or 8th) 
  155.                                         item. 
  156.  
  157. right-shift right-arrow & down-arrow    go to last item. 
  158.  
  159. right-shift left-arrow & up-arrow       go to first 
  160.                                         (top) item. 
  161.  
  162. ENTER               toggle flag 34 display mode - see 
  163.                     below. 
  164.  
  165. EDIT       
  166. or +/-              all lines must be processed, an empty 
  167.                     string is ok. Pressing the ATTN (ON) 
  168.                     key quits edit mode, discarding all 
  169.                     input. 
  170.  
  171. +                   add an item after the current item. 
  172.  
  173. *                   turn off the menu bar, so up to 8 
  174.                     lines can be displayed (see flag 32 
  175.                     below) 
  176.  
  177. DEL or -            delete the current item (you can't 
  178.                     delete 1 of 1) 
  179.  
  180. right-shift OFF     pauses program and turns the machine 
  181.                     off, turning password protection 
  182.                     (lock mode) back on in the process. 
  183.                     The machine will beep when re- 
  184.                      
  185.  
  186. shift-PRINT         print current item. 
  187.  
  188. any other key       exit program. 
  189.  
  190.  
  191. There is no sorting provided, but you can use ->STK, 
  192. STK->, and DEL to move things around. (If you have 
  193. Donnelly's Toolkit library, you can use LSORT - see 
  194. below). The data format makes it fairly easy to transfer 
  195. data to a PC and edit it there - you must use ascii mode 
  196. to transfer it. 
  197.  
  198. The following global variables must be present in the 
  199. current directory, and are provided with the listing. 
  200. However, with the exception of rdLIST, they are hidden. 
  201. To unhide them, execute #15777h SYSEVAL PURGE while in 
  202. the Roldx directory. Normally, you should not need to 
  203. unhide them. 
  204.  
  205. rdLIST    a list containing names of any data lists you 
  206.           want to choose from. Any number of names can 
  207.           be in the list, but only up to 6 names can 
  208.           be displayed by Roldx. 
  209.  
  210. rdNAME    a global containing another global which points 
  211.           to the roldx data list. For example, if the 
  212.           name of your data list is LIST1, then 'rdNAME' 
  213.           should contain the global 'LIST1', *not* the 
  214.           list itself! This way, you can maintain 
  215.           several databases, storing their names in 
  216.           rdNAME as and when needed. The format of the 
  217.           data list is a list of lists, each inner list 
  218.           containing at least 1 item, which can be an 
  219.           empty string. The program will not create a  
  220.           new list if one is not present, so you should  
  221.           modify the one I have provided, called 
  222.           LIST1. The data list must be in the Roldx 
  223.           directory!!! 
  224.  
  225. rdSIZ     the number of entries (lists) in the data list. 
  226.  
  227. rdPOS     number of the current item to display. 
  228.  
  229. rdLINE    number of the line to search on, and the number 
  230.           of the line which gets displayed when 
  231.           displaying only the headings (flag 34 set). 
  232.  
  233. rdTXT     the last text sought by the FIND command (can 
  234.           be a null string). 
  235.  
  236. The settings of user flags 32, 33, 34, 35, 36 & 39 are as 
  237. follows - use the STATUS menu key to enter status mode 
  238. and change the settings (changing the flags outside the 
  239. program will have no effect): 
  240.  
  241. Flag 32   if clear, the menu line is displayed, plus (up 
  242.           to) 7 lines of text. If set, the menu line is 
  243.           not displayed, allowing 8 lines of text. 
  244.  
  245. Flag 33   if clear, the FIND command searches from the 
  246.           current position in the list, if set, it 
  247.           searches from the beginning, which can be very 
  248.           slow for large databases. Note that only the 
  249.           line number in rdLINE is searched (searching 
  250.           all lines would be too slow - perhaps a future 
  251.           PDL version will overcome this). 
  252.  
  253. Flag 34   if clear, display all lines of each item, if 
  254.           set, display only one line of each item, for a 
  255.           total of seven items on each screen, or eight 
  256.           if the menu line is off. With flag 34 set, the 
  257.           line displayed for each item is the value of 
  258.           rdLINE. When flag 34 is set, using left-shift- 
  259.           arrows will scroll ahead or back by exactly 7 
  260.           (flag 32 clear) or 8 (flag 32 set) items. 
  261.  
  262. Flag 35-36   temporary flags for various operations. 
  263.  
  264. Flag 39   when clear, lock mode is on and individual 
  265.           items which are password protected will appear 
  266.           garbled. When set (this must be done from the 
  267.           status menu, and the password given), the items 
  268.           will be readable only if the password given was 
  269.           the correct one, otherwise they will appear 
  270.           garbled. 
  271.  
  272. All flags default to clear when Roldx is started. 
  273.  
  274. The programs HELP, STATUS, and DATA will also work when  
  275. outside of the ROLDX program, however, if you use STATUS  
  276. on its own, then some of the settings reflected or changed 
  277. will not take effect while inside Roldx, since all flag  
  278. settings default to the values listed above when running 
  279. the program. Also, if you hit the LOCK key, and give a  
  280. password, this password will be stored in a global variable 
  281. 'pwrd' and will NOT be purged until the next time that you 
  282. run Roldx. Therefore, it is advisable that you purge the  
  283. variable yourself, or run Roldx immediately, to ensure that 
  284. noone has access to your password. 
  285.  
  286. Miscellaneous notes: 
  287.  
  288. Some of the routines are appropriate for general use. 
  289. These are as follows (see note above to unhide): 
  290.  
  291. CODER     Written by Simone Rapisarda and Jim Cloos. 
  292.           Put string to encode or decode in level 2,  
  293.           password string in level one. 
  294.  
  295. bell      an error bell - edit to anything you want, as 
  296.           long as it can be evaluated. 
  297.  
  298. UPcase    change case of characters between "a" and "z" 
  299.           to uppercase. Machine language routine by 
  300.           unknown author (my apologies). 
  301.  
  302. MDISP     written by Rick Grevelle. String to display in 
  303.           level 2 (must be a string) and line number in 
  304.           level one. Will overwrite the menu line if the 
  305.           number is 6 or greater (numbers start at 0). 
  306.  
  307. As noted above, if you want to sort the data list, you 
  308. can use Donnelly's LSORT. Put the list on the stack and 
  309. press OBJ->, then enter the number of the line you want 
  310. to sort on (usually will be 1), then press LSORT from the 
  311. TLLIB menu. Note that this will sort on the first 
  312. letter(s) of each line so it is not really appropriate if 
  313. you put surnames last (in other words, if you put 
  314. surnames last, you will be sorting on first names). 
  315.  
  316. You can edit each item outside of the ROLDX program by 
  317. using ->STK, then edit it with the normal 48 object 
  318. editor, then run ROLDX again and use STK->. If the stack 
  319. does not contain a list with at least 1 item, an error 
  320. will be generated. 
  321.  
  322. Some may ask why I put the  program's dynamic parameters 
  323. (like dPOS, for example) in separate global variables, 
  324. rather than in a parameter list. The answer is SPEED! The 
  325. 48 can evaluate a global variable at least twice as fast 
  326. as GETting a list item, and this can make a big 
  327. difference to a program written in RPL. A future version 
  328. of this program might be written in PDL, but don't hold 
  329. your breath. 
  330.  
  331. I personally don't see the usefulness of compiling this 
  332. into a library, but it should be do-able, providing the 
  333. variables rdXXX mentioned above are in the $VAR list used 
  334. by USRLIB. 
  335.  
  336. This program makes use of machine language routines which 
  337. have not been written by me, and may not work on every 
  338. machine. The program is free and distributed as-is - use 
  339. at your own risk - I make no warranties or guarantees of 
  340. any kind. 
  341.  
  342. James Weisbin 73457.3462@compuserve.com 
  343.  
  344. END_DOC 
  345.